home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / amos / eaissu3b.lha / Source_Code / AK_Encrypter_1.AMOS / AK_Encrypter_1.amosSourceCode
AMOS Source Code  |  1995-12-30  |  1KB  |  43 lines

  1. ' Quick Encryption program.
  2.  
  3. ' This program will only encrypt 10 letters of any piece of text.  
  4. ' These are A-I, and CHR$(10), a character string VITAL to the ASCII 
  5. ' System. Characters are in lower case.
  6.  
  7. Do 
  8.    F$=Fsel$("","","Select the SOURCE file","to Encrypt")
  9.    G$=Fsel$("","","Select DEST file")
  10.    
  11.    Open In 1,F$ : Reserve As Data 10,Lof(1)
  12.    Reserve As Data 11,Lof(1)
  13.    Close : Bload F$,10 : Rem Load in all of source file 
  14.    
  15.    ' Now for the Loop 
  16.    
  17.    LE=0
  18.    
  19.    Repeat 
  20.       P=Peek(Start(10)+LE)
  21.       
  22.       If P>96 and P<105
  23.          If P=97 : CHAR=2 : Print "Changed Value" : End If 
  24.          If P=98 : CHAR=5 : Print "Changed Value" : End If 
  25.          If P=99 : CHAR=1 : Print "Changed Value" : End If 
  26.          If P=100 : CHAR=4 : Print "Changed Value" : End If 
  27.          If P=101 : CHAR=3 : Print "Changed Value" : End If 
  28.          If P=102 : CHAR=8 : Print "Changed Value" : End If 
  29.          If P=103 : CHAR=6 : Print "Changed Value" : End If 
  30.          If P=104 : CHAR=7 : Print "Changed Value" : End If 
  31.       Else 
  32.          CHAR=P
  33.       End If 
  34.       
  35.       If P=10 : CHAR=252 : Print "Changed CHR$(10)" : End If 
  36.       
  37.       Poke Start(11)+LE,CHAR
  38.       Inc LE
  39.    Until LE>Length(10)
  40.    
  41.    Bsave G$,Start(11) To Start(11)+Length(11)
  42.    Erase 10 : Erase 11 : Cls 
  43. Loop